package com.cnhis.cloudhealth.clinical.hosnurse.hospitalmodulation.bo;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cnhis.cloudhealth.clinical.hosnurse.hospitalmodulation.dao.HospitalModulationDao;
import com.cnhis.cloudhealth.commons.Mappers.ModelVo;
import com.cnhis.cloudhealth.commons.utils.StaticKeys;
@Service
public class HospitalModulationBo {
      @Resource
      private HospitalModulationDao hospitalModulationDao;
      
      public ModelVo queryCareLevel()throws Exception{
    	  ModelVo mo = new ModelVo();
  		List list =null;
  		try {
  			list=hospitalModulationDao.queryCareLevel();
  			
  		} catch (Exception e) {
  			e.printStackTrace();
  			mo.setResult(StaticKeys.OH_FALSE);
  			return mo;
  		}
  		mo.setList(list);
  		mo.setResult(StaticKeys.OH_SUCCESS);
  		mo.setRows(list);
  		return mo;
      }
      public ModelVo queryDisease()throws Exception{
    	  ModelVo mo = new ModelVo();
    		List list =null;
    		try {
    			list=hospitalModulationDao.queryDisease();
    			
    		} catch (Exception e) {
    			e.printStackTrace();
    			mo.setResult(StaticKeys.OH_FALSE);
    			return mo;
    		}
    		mo.setList(list);
    		mo.setResult(StaticKeys.OH_SUCCESS);
    		mo.setRows(list);
    		return mo;
      }
    
      public ModelVo queryHosDoctor(Map map)throws Exception{
    	  ModelVo mo = new ModelVo();
  		List list =null;
  		try {
  			map.put("parav", hospitalModulationDao.getParams117());
  			list=hospitalModulationDao.queryHosDoctor(map);
  			
  		} catch (Exception e) {
  			e.printStackTrace();
  			mo.setResult(StaticKeys.OH_FALSE);
  			return mo;
  		}
  		mo.setList(list);
  		mo.setResult(StaticKeys.OH_SUCCESS);
  		mo.setRows(list);
  		return mo;
      }
      public ModelVo queryHosNurse(Map map)throws Exception{
    	  ModelVo mo = new ModelVo();
    		List list =null;
    		try {
    			map.put("parav", hospitalModulationDao.getParams117());
    			list=hospitalModulationDao.queryHosNurse(map);
    			
    		} catch (Exception e) {
    			e.printStackTrace();
    			mo.setResult(StaticKeys.OH_FALSE);
    			return mo;
    		}
    		mo.setList(list);
    		mo.setResult(StaticKeys.OH_SUCCESS);
    		mo.setRows(list);
    		return mo;
    	  
      }
}
